﻿<UserControl x:Class="CodeBuilder2.View.CB_UserControl.Content.TableSelectContent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Loaded="UserControl_Loaded">
    <Grid Name="grdContentPane" Grid.Row="1" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <CheckBox Content="全选" HorizontalAlignment="Left" Name="chkSelectAll" VerticalAlignment="Center" Margin="15,5"/>
        <!--<ListBox Grid.Row="1" Name="lstChkContainer">
                    <ListBox.ItemTemplate>
                        <DataTemplate DataType="string">
                            <CheckBox Tag="{Binding table_name}" Name="chkTable" IsChecked="{Binding Mode=OneWay, ElementName=chkSelectAll, Path=IsChecked}" MinWidth="130" Margin="10,5" Content="{Binding RelativeSource={RelativeSource Mode=Self},Path=Tag}"/>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>-->
        <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Visible">
            <WrapPanel Name="spChkContainer" Orientation="Vertical" MaxHeight="480" MaxWidth="640">
                <WrapPanel.Resources>
                    <Style TargetType="CheckBox">
                        <Setter Property="IsChecked">
                            <Setter.Value>
                                <Binding Mode="OneWay" ElementName="chkSelectAll" Path="IsChecked"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="MinWidth" Value="130"/>
                        <Setter Property="Margin" Value="10,5"/>
                    </Style>
                </WrapPanel.Resources>
            </WrapPanel>
        </ScrollViewer>
        <StackPanel Grid.Row="2">
            <StackPanel Orientation="Horizontal" Margin="0,5">
                <TextBlock Text="默认命名空间：" VerticalAlignment="Center"/>
                <TextBox Name="txtNameSpace" Text="Model" Width="120" VerticalAlignment="Center"/>
            </StackPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="语言名称：" VerticalAlignment="Center"/>
                <ComboBox Grid.Column="1" Name="cbxLanguageName" Margin="0,5">
                    <ComboBoxItem Content="CSharp" Selector.IsSelected="True"/>
                    <ComboBoxItem Content="Visual Basic" />
                    <ComboBoxItem Content="JScript" />
                </ComboBox>
                <Button Grid.Column="2" Content="生成选中" Name="btnBuild" HorizontalAlignment="Right" Width="60" Margin="0,5,30,5" VerticalAlignment="Center" Click="btnBuild_Click" />
            </Grid>
        </StackPanel>
    </Grid>
</UserControl>
